@import '../../assets/styles/common/variable.scss';
$asideWidthNum: 400;
$asideTranTime: 0.5s;
$arrowTranTime: 0.5s;
@mixin asideTran () {
  transition: left $asideTranTime ease-in-out;
}
@mixin arrowTran () {
  transition: transform $arrowTranTime ease-in-out;
}
@mixin mainTran () {
  transition: padding-left $asideTranTime ease-in-out;
}
@mixin bg ($imgPath) {
  background: url("../../assets/images/#{$imgPath}") no-repeat center center;
  background-size: 100% auto;
}
@mixin dl () {
  display: inline-block;
  vertical-align: middle;
}
@mixin df () {
  display: flex;
  align-items: center;
}
@mixin giveEllipsis () {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.container {
  background: url("../../assets/images/wallpaper/bg_yourName.jpg") no-repeat left top;
  background-size: cover;
  text-overflow: ellipsis;

  &.showAside {
    .aside {
      left: 0;
      @include asideTran;
      .btn-arrow-right {
        transform: rotateY(0.5turn);
        @include arrowTran;
      }
    }
    //.main {
    //  padding-left: px2($asideWidthNum);
    //  @include mainTran;
    //}
  }
  .aside {
    left: px2(-$asideWidthNum + 50);
    top: 0;
    width: px2($asideWidthNum);
    background: rgba(0, 0, 0, 0.5);
    @include asideTran;
    .btn-arrow-right {
      right: px2(15);
      top: px2(10);
      width: px2(24);
      height: px2(24);
      @include bg('common/icon_aside.png');
      @include arrowTran;
    }

    .aside-header {
      margin-top: px2(20);
      text-align: center;
      .avatar-img {
        width: px2(60);
        height: px2(60);
        border-radius: 50%;
        overflow: hidden;
      }
      .avatar-name {
        font-size: px2(20)
      }
    }
    .list-box {
      max-height: px2(400);
      margin-top: px2(60);
      overflow: auto;
      .list-item {
        padding: 0 px2(20);
        border: px2(1) solid transparent;
        .item-content {
          position: relative;
          height: px2(60);
          line-height: px2(60);
          padding-left: px2(40);
          overflow: hidden;
          .icon {
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: px2(24);
            height: px2(24);
            &.i-slideShow {
              top: 55%;
              @include bg('aside/icon_slideShow.png');
            }
            &.i-demo {
              top: 55%;
              @include bg('aside/icon_demo.png');
            }
            &.i-resume {
              top: 55%;
              @include bg('aside/icon_resume.png');
            }
          }
          .item-text {
            @include dl;
            @include giveEllipsis;
            width: 100%;
            font-size: px2(20);
            color: #fff;
          }
        }
        &:hover {
          border: px2(1) solid $blue;
          box-shadow: px2(5) px2(2) px2(10) rgba(255,255,255,0.2);
          transition: border 0.5s linear;
          .item-content {
            .item-text {
              transform: translateX(px2(30));
              transition: all 0.3s ease-in-out;
            }
          }
        }
      }
    }
  }

  .main {
    //padding-left: 0;
    //@include mainTran;
    background-color: rgba(72, 61, 139, 0.5);
  }
}
